package com.fengxing.ams.web.facade.mouble.realtime;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

public interface ISchool2DAO extends PagingAndSortingRepository<SchoolVO2, Integer>, JpaSpecificationExecutor<SchoolVO2>  {

	@Query(value = "SELECT CONCAT(school_id, '-', school_name,'%', clazz) FROM zyt_realtime_school", nativeQuery=true)
	List<String> findAllSchoolName();

	@Query("select t from SchoolVO2 t where t.school_id = :school_id and t.school_name = :school_name and t.clazz = :clazz")
	SchoolVO2 findSchoolVO(@Param("school_id")String school_id, @Param("school_name")String school_name, @Param("clazz")String clazz);
	
}
